home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / hobby / gim_308.zip / GIM11H.DOC < prev    next >
Text File  |  1993-09-09  |  16KB  |  348 lines

  1.           CHAPTER 11     LISTS OF SIMILAR PERSONS, FAMILIES AND NOTES
  2.  
  3.                                       OR
  4.  
  5.           SEARCHING YOUR FOLDER FOR SPECIFIC INFORMATION
  6.  
  7.  
  8. PART H:  ADVANCED EXAMPLES; ARCANE WHERE COMMAND SYNTAX...
  9.  
  10. WARNING!!!
  11.  
  12.           This section is NOT FOR THE FAINT OF HEART!!!
  13.  
  14.           This section covers advanced topics in GIM LISTS WHERE
  15.           command construction, and should only be attempted by those
  16.           persons who feel very, very comfortable with the basics.
  17.  
  18.           Before reading this section, you should be very familiar with
  19.           the sections of this chapter up to this point, and you should
  20.           have played around with the examples in this chapter and used
  21.           GIM LISTS on your own folder before continuing.
  22.  
  23.           That having been said, turn back now, or read the rest of
  24.           this section at your own risk!
  25.  
  26. PURPOSE...
  27.  
  28.           WHAT THIS SECTION WILL DO FOR YOU
  29.  
  30.           As we've said elsewhere, GIM LISTS was designed to be a very
  31.           powerful database querying mechanism.  It was designed, in
  32.           short, to allow you to search for anything you can imagine.
  33.  
  34.           The GIM LISTS tools introduced up to this point are able to
  35.           handle 95% of the things you may want to look for.  However,
  36.           there are some things that you may want to look for which
  37.           simply can't be done with the basic GIM LISTS commands.
  38.  
  39.           Therefore, the extensions to GIM LISTS described in this
  40.           section were added to augment the power of GIM LISTS, and to
  41.           handle those few cases where the basic tools don't suffice.
  42.  
  43.           These extensions are referred to tongue-in-cheek as "arcane"
  44.           commands, because they won't be needed all that often, and
  45.           because their syntax (admittedly) isn't very intuitive.  But
  46.           they are useful to know about, because they greatly increase
  47.           your power in those occasional situations where you need to
  48.           search for something unusual.
  49.  
  50. OVERVIEW...
  51.  
  52.           AN OVERVIEW OF THE REST OF THIS SECTION
  53.  
  54.           The rest of this section will cover the following situations,
  55.           which the basic tools can't handle without some help.  Along
  56.           the way, we'll discuss the problems and solutions for each of
  57.           these situations:
  58.  
  59.           1.  You want to create a list persons who have a place name
  60.               in "Niger", but not "Nigeria", or "Mexico" but not "New
  61.               Mexico".  Or you want to create a list of persons who
  62.               have a note about "Italy" but not one about "Rome".  Or
  63.               you want to create a list of families with at least one
  64.               child named David who was born in Wisconsin.
  65.  
  66.           2.  You want to create a list of persons who lived at least
  67.               80 years.  Or who were married to each other for at least
  68.               10 years before one of them died.  Or who were baptized
  69.               before the age of eight.
  70.  
  71.           3.  You want to create a list of persons whose LDS temple
  72.               ordinances were performed in temples which didn't exist
  73.               at the time -- such as a Salt Lake Temple sealing in
  74.               1877, or a Nauvoo Temple endowment in 1946, or an
  75.               Endowment House sealing in 1906.
  76.  
  77. CASE ONE:  THE COLON OPERATOR
  78.  
  79.           Suppose you want to create a list of persons who have a place
  80.           name -- any place name -- in "Niger", but not "Nigeria", or
  81.           in "Mexico" but not "New Mexico".
  82.  
  83.           You already know how to search for any place name in Niger.
  84.           That's done like this:
  85.  
  86.           WHERE any place name contains "Niger"
  87.  
  88.           But that doesn't rule out place names in "Nigeria", and if
  89.           you want to leave them out, you're out of luck -- you'll get
  90.           them anyway.
  91.  
  92.           Your first instinct might be to do this, and you'd be wrong:
  93.  
  94.           WHERE any place contains "Niger" and
  95.                 any place doesn't contain "Nigeria"
  96.  
  97.           This would select people from Niger, but it wouldn't keep out
  98.           people from Nigeria.  If you have someone who is born in
  99.           Nigeria and who died in Arizona, he or she would be selected,
  100.           because he or she has a place name that contains "Niger", and
  101.           another one (Arizona) that doesn't contain "Nigeria".
  102.  
  103.           Part of the reason for the confusion is that the following
  104.           WOULD work:
  105.  
  106.           WHERE birth place contains "Niger" and
  107.                 birth place doesn't contain "Nigeria"
  108.  
  109.           This looks similar to the problem WHERE command above, which
  110.           doesn't work.  However, this one DOES work, as long as you're
  111.           only interested in a specific place for each person, such as
  112.           a birth place.
  113.  
  114.           The problem here is that once you include the ANY and ALL
  115.           modifiers, you open yourself up for ambiguity.
  116.  
  117.           The solution to this problem is to introduce the Colon
  118.           operator (:), and to use it like this:
  119.  
  120.           WHERE any place : contains "Niger" and
  121.                             doesn't contain "Nigeria"
  122.  
  123.           (Note that there must be at least one space before and after
  124.           the colon itself.)
  125.  
  126.           So why does this WHERE command work if the earlier WHERE
  127.           command doesn't work?
  128.  
  129.           Because "any place contains something" refers to a set of
  130.           things, and "any place doesn't contain another thing" refers
  131.           to a set of things, and because each of these sets is
  132.           evaluated separately.
  133.  
  134.           But when we pull the "any place" out in front of a colon
  135.           operator (:), we evaluate everything after the colon at the
  136.           same time for each place.  That way, someone who was born in
  137.           Nigeria wouldn't pass the test, although someone born in
  138.           Niger would.  (Also, someone born in Nigeria who died in
  139.           Niger would naturally also pass the test.)
  140.  
  141. MORE USES FOR THE COLON OPERATOR
  142.  
  143.           Now that you've seen the colon operator, you can imagine what
  144.           other uses it has.  Just as with Niger and Nigeria, you can
  145.           use it to filter out people from Mexico from those from New
  146.           Mexico.
  147.  
  148.           You have a similar problem when you search through a person's
  149.           notes.  If you look for notes about Italy, but not about
  150.           Rome, you'll get into trouble with this command:
  151.  
  152.           WHERE any note contains "Italy" and
  153.                 any note doesn't contain "Rome"
  154.  
  155.           ... for the same reason.  If the christening source note
  156.           contains "Rome, Italy" and the death research note doesn't
  157.           say anything about Rome, then this person will be selected,
  158.           even though you didn't want to select him or her.
  159.  
  160.           The solution, of course, is this:
  161.  
  162.           WHERE any note : contains "Italy" and doesn't contain "Rome"
  163.  
  164.           The story is the same if you want to create a list of
  165.           families with at least one child named David who was born in
  166.           Wisconsin.  (I know; it's a far-fetched example; but then
  167.           again, that's why these are called "arcane commands"!)
  168.  
  169.           This one won't work:
  170.  
  171.           WHERE any child given is "David" and
  172.                 any child birth place contains "Wisconsin"
  173.  
  174.           ... because it will select any family with a child named
  175.           David -- whether or not he was born in Wisconsin -- as long
  176.           as he or some OTHER child WAS born in Wisconsin.
  177.  
  178.           The solution is this, which will work:
  179.  
  180.           WHERE any child : given is "David" and
  181.                             birth place contains "Wisconsin"
  182.  
  183.           The moral of this story is:  pay close attention when you
  184.           want to use the ANY modifier in the same WHERE command with
  185.           an AND conjunction.  That situation is an ideal time to use
  186.           the Colon operator.
  187.  
  188. CASE TWO:  THE PLUS AND MINUS OPERATORS
  189.  
  190.           By now, you know how to compare date variables.  For example,
  191.           you know how to search for persons who died before they were
  192.           born, like this:
  193.  
  194.           WHERE death date is before birth date
  195.  
  196.           This is an ideal way to search for errors in your folder.  I
  197.           should know; I've used it, and found several typos and other
  198.           problems in my folder!  However, although this gives us the
  199.           ability to find gross errors in our data, it is much too
  200.           limited.
  201.  
  202.           Suppose you want to persons who died before they were ten
  203.           years old.  How would you do it?  The concept is simple:  we
  204.           clearly want to modify the WHERE command above so that it
  205.           reads something like "WHERE death date is before birth-date-
  206.           plus-ten-years".
  207.  
  208.           So as not to keep you in undue suspense, that concept is
  209.           translated into WHERE command syntax as follows:
  210.  
  211.           WHERE death date is before birth date PLUS 100000
  212.  
  213.           Any date variable can be modified with a PLUS or MINUS
  214.           keyword in this way.  The value after the PLUS or MINUS
  215.           keyword is of the form YYYYMMDD, where YYYY is a number of
  216.           years, MM is a number of months, and DD is a number of days.
  217.           Therefore, 100000 should be interpreted by splitting it up
  218.           into three parts -- in other words: 10 (years), 00 (months),
  219.           and 00 (days).
  220.  
  221. MORE USES FOR THE PLUS AND MINUS KEYWORDS
  222.  
  223.           Having said that, you should be see how to create a list of
  224.           persons who lived at least 80 years.  The WHERE command would
  225.           look like this:
  226.  
  227.           WHERE death date is after birth date PLUS 800000
  228.  
  229.           It is also straightforward how to create a list of persons
  230.           who were baptized before the age of eight.  That WHERE
  231.           command would look like this:
  232.  
  233.           WHERE baptism date is before birth date PLUS 80000
  234.  
  235.           It is a little less obvious how to create a list of couples
  236.           who were married to each other for at least 10 years before
  237.           one of them died.  Study the following WHERE command, which
  238.           is applied to a list of families:
  239.  
  240.           WHERE  husband death date is after marriage date PLUS 100000
  241.                 and wife death date is after marriage date PLUS 100000
  242.  
  243. WARNINGS ABOUT THE PLUS AND MINUS MODIFIERS
  244.  
  245.           There are two things to be aware of with regard to these
  246.           modifiers.
  247.  
  248.           WARNING NUMBER ONE:
  249.  
  250.           The first is that GIM LISTS is smart enough to ignore date
  251.           comparisons when dates don't exist.  In other words, if
  252.           you're looking for people born before 1700, GIM LISTS is
  253.           smart enough to ignore people whose birth dates are missing,
  254.           and it doesn't report them to you as persons born before
  255.           1700.  However, all bets are off when you use the PLUS and
  256.           MINUS modifiers.  When you use them, GIM LISTS is unable to
  257.           distinguish very early dates from missing ones.
  258.  
  259.           To get around this problem, you should combine PLUS and MINUS
  260.           searches with IS COMPLETE or IS ACCEPTABLE operands.  So for
  261.           example, to be absolutely accurate, the test above for
  262.           couples married at least ten years should really look
  263.           something like this:
  264.  
  265.           WHERE marriage date is complete and
  266.                 husband death date is complete and
  267.                 wife death date is complete and
  268.                  husband death date is after marriage date PLUS 100000
  269.                 and wife death date is after marriage date PLUS 100000
  270.  
  271.           WARNING NUMBER TWO:
  272.  
  273.           When adding years, months, and days to a date with the PLUS
  274.           and MINUS modifiers, GIM LISTS isn't smart enough to carry
  275.           excess days and months into the next month and year.  It
  276.           isn't smart enough, in other words, to add six months to
  277.           December 1805, and get (as you might expect) May, 1806.
  278.  
  279.           That's because it was only designed to handle gross changes
  280.           in time, such as "ten years" or "eighty years".  It can still
  281.           handle the months and days okay, as long as it isn't expected
  282.           to carry them over.
  283.  
  284.           To be brutally, graphically descriptive, what's actually
  285.           going on is this:  GIM LISTS takes the year and translates it
  286.           into a number.  For example, December 23, 1805, becomes
  287.           18051223.  If you then add 38 years, six months and four days
  288.           -- which you specify as 380604 -- to this value, GIM LISTS
  289.           simply adds them, resulting in 18431827.  As you can see, the
  290.           result is "the 27th day of the 18th month of 1843", which
  291.           really doesn't mean a whole lot, and GIM LISTS will behave in
  292.           unpredictable ways when it tries to compare this value to a
  293.           "real" date.
  294.  
  295.           The moral of the story is:  use months and days at your own
  296.           risk, realizing that they might work well, and they might
  297.           not.  Your best advice is to stick with comparing years this
  298.           way.
  299.  
  300. CASE THREE:  THE PLACEBEG AND PLACEEND OPERANDS
  301.  
  302.           You already have the tools to handle most of the situations
  303.           that connect dates with places.  You can, for example, find
  304.           persons born in Connecticut before 1700.  With the colon
  305.           operator, you can find any event which took place in a
  306.           certain place at a certain time.
  307.  
  308.           In the case of LDS temples, however, this is a little more
  309.           problematic.  You can still do the same sort of thing, by
  310.           searching for any LDS event in the Salt Lake Temple before it
  311.           opened in 1893.  But doing so requires that you already know
  312.           the opening and closing dates for each of the LDS temples.
  313.           Moreover, it doesn't give you the flexibility of comparing
  314.           opening and closing dates for each of the temples in a single
  315.           command.
  316.  
  317.           To address this concern, GIM LISTS provides PLACEBEG and
  318.           PLACEEND operands.  These are date operands, and they only
  319.           have meaning for LDS events -- baptism, endowments, and
  320.           sealings.  They represent the opening and closing dates for
  321.           each temple, and they work like this:
  322.  
  323.           Suppose you want to create a list of persons whose LDS temple
  324.           ordinances were performed in temples which didn't exist at
  325.           the time -- such as a Salt Lake Temple sealing in 1877, or a
  326.           Nauvoo Temple endowment in 1946, or an Endowment House
  327.           sealing in 1906.
  328.  
  329.           Rather than searching for each of these things on a temple-
  330.           by-temple basis, you can issue a WHERE command like this:
  331.  
  332.           WHERE endowment date : is before PLACEBEG or
  333.                                  is after PLACEEND
  334.  
  335.           You know already that this command tells GIM LISTS to search
  336.           through each person's endowments.  For each of these endow-
  337.           ments, it compares the date of the endowment to the opening
  338.           date of the place of that endowment (PLACEBEG), and is also
  339.           compares the date of the endowment to the closing date of the
  340.           place of that endowment (PLACEEND).
  341.  
  342.           This capability provides a quick way to search your folder
  343.           for possible typos or other data inconsistencies.
  344.  
  345.           Please note:  if an LDS baptismal date exists, and if an LDS
  346.           baptismal place name contains the word "living", it is always
  347.           true that the baptismal date is between PLACEBEG and PLACEEND.
  348.